#ifndef COMPONENTCALL_H
#define COMPONENTCALL_H

#include <QList>
#include "namespace.h"

class HtmlAttributeList;
class MemberList;
class Component;
class Property;

class ComponentCall : public Namespace
{
public:
    ComponentCall(const QString& componentName, const QString& varName, HtmlAttributeList* attribs, MemberList* members, const YYLTYPE& loc);

    QString componentName() const { return m_componentName; }
    QString varName() const { return m_varName; }
    HtmlAttributeList* attributeList() const { return m_attribs; }
    Node* memberForAttribute(int index) const { return m_membersForAttribs[index]; }
    MemberList* members() const { return m_members; }

    Component* component() const { return m_component; }

    virtual Node* getEntry( const QString& name );
    virtual void resolveAll();
    virtual Type type();

private:
    QString m_componentName;
    QString m_varName;
    HtmlAttributeList* m_attribs;
    MemberList* m_members;
    Component* m_component;
    QList<Node*> m_membersForAttribs;
};

#endif // COMPONENTCALL_H
